package com.webbdong.aop.agent.test.exception;

import net.bytebuddy.asm.Advice;
import org.apache.commons.io.output.StringBuilderWriter;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

import java.io.PrintWriter;
import java.io.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @program: spring-agent
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2023-05-05 09:38
 **/
public class ExceptionAdviceInterceptor {

    @Advice.OnMethodExit()
    public static void exit(@Advice.This Object object) {
        if (!(object instanceof Throwable)) {
            return;
        }


    }

    public static void main(String[] args) {
        Writer writer = new StringBuilderWriter();

        StackTraceElement[] stackTrace = new RuntimeException().getStackTrace();

//        new RuntimeException(new ArithmeticException()).getSuppressed().length;
        System.out.println();
    }
}
